﻿@model pgnSoft.Veloz.ERP.Models.PageModel

@foreach (pgnSoft.Veloz.ERP.Models.PageModels.IPageSection  section in (from d in Model.Sections orderby d.RenderOrder ascending select d))
{
    if (section.Model == pgnSoft.Veloz.ERP.Models.PageModels.PageSectionModel.FileViewPageContent)
    { 
        if(section is pgnSoft.Veloz.ERP.Models.PageModels.PageSections.FileViewPageContent)
        {
            @RenderPage(((pgnSoft.Veloz.ERP.Models.PageModels.PageSections.FileViewPageContent)section).ViewFilename)
        }
        else
        {
            throw new Exception(string.Format(Model.Resource.GetString("Models_PageModels_PageSections_FileViewPageContent_NotValidObject"), section.ToString())); 
        }
        
    }
}

    